<script setup>
import { computed, getCurrentInstance } from "vue";
import { loadGame } from '@/utils/lcd_next';
import { ElCard } from 'element-plus';

const { proxy } = getCurrentInstance();
const starGames = computed(() => proxy.$gamesStore.games.filter((_, idx) => idx < 3));
</script>
<template>
<el-card>
  <el-carousel height="300px" class="games-carousel">
    <el-carousel-item v-for="item in starGames" :key="item.idx">
      <a href="javascript:void(0)" @click="loadGame(item)">
        <img src="https://img.bbkgames.com/web/image/mod-2.png" alt="" srcset="">
      </a>
    </el-carousel-item>
  </el-carousel>
</el-card>
</template>
<style lang="less">
.games-carousel {
  width: 500px;
}
</style>